package controller;

import java.io.PrintWriter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class ShowController {
	@RequestMapping ("/showPage")  
	public ModelAndView showPage(HttpServletRequest request, HttpServletResponse response) throws Exception { 
		ModelAndView modelAndView = new ModelAndView();  
		String projectId = request.getParameter("projectId");
	    modelAndView.setViewName( "show.jsp" );  
	    modelAndView.addObject("projectId", projectId);
	    return modelAndView;  
	}
	@RequestMapping ("/test")  
	public void test(HttpServletRequest request, HttpServletResponse response) throws Exception { 
		PrintWriter out = response.getWriter();
		out.write("serverData");
	}
}
